package com.jiuqi.ccp.generator.dao.pojo;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="CCP_GT_NODE"
 *     
*/
public class CcpGtNode implements Serializable {

    /** identifier field */
    private String cgnGuid;

    /** nullable persistent field */
    private String cgnName;

    /** nullable persistent field */
    private String parentGuid;

    /** nullable persistent field */
    private String parentName;

    /** nullable persistent field */
    private String cgtGuid;

    /** nullable persistent field */
    private String cgnExplain;

    /** nullable persistent field */
    private String reserved1;

    /** nullable persistent field */
    private String reserved2;

    /** nullable persistent field */
    private String reserved3;

    /** full constructor */
    public CcpGtNode(String cgnGuid, String cgnName, String parentGuid, String parentName, String cgtGuid, String cgnExplain, String reserved1, String reserved2, String reserved3) {
        this.cgnGuid = cgnGuid;
        this.cgnName = cgnName;
        this.parentGuid = parentGuid;
        this.parentName = parentName;
        this.cgtGuid = cgtGuid;
        this.cgnExplain = cgnExplain;
        this.reserved1 = reserved1;
        this.reserved2 = reserved2;
        this.reserved3 = reserved3;
    }

    /** default constructor */
    public CcpGtNode() {
    }

    /** minimal constructor */
    public CcpGtNode(String cgnGuid) {
        this.cgnGuid = cgnGuid;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="CGN_GUID"
     *         
     */
    public String getCgnGuid() {
        return this.cgnGuid;
    }

    public void setCgnGuid(String cgnGuid) {
        this.cgnGuid = cgnGuid;
    }

    /** 
     *            @hibernate.property
     *             column="CGN_NAME"
     *             length="50"
     *         
     */
    public String getCgnName() {
        return this.cgnName;
    }

    public void setCgnName(String cgnName) {
        this.cgnName = cgnName;
    }

    /** 
     *            @hibernate.property
     *             column="PARENT_GUID"
     *             length="32"
     *         
     */
    public String getParentGuid() {
        return this.parentGuid;
    }

    public void setParentGuid(String parentGuid) {
        this.parentGuid = parentGuid;
    }

    /** 
     *            @hibernate.property
     *             column="PARENT_NAME"
     *             length="50"
     *         
     */
    public String getParentName() {
        return this.parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    /** 
     *            @hibernate.property
     *             column="CGT_GUID"
     *             length="32"
     *         
     */
    public String getCgtGuid() {
        return this.cgtGuid;
    }

    public void setCgtGuid(String cgtGuid) {
        this.cgtGuid = cgtGuid;
    }

    /** 
     *            @hibernate.property
     *             column="CGN_EXPLAIN"
     *             length="100"
     *         
     */
    public String getCgnExplain() {
        return this.cgnExplain;
    }

    public void setCgnExplain(String cgnExplain) {
        this.cgnExplain = cgnExplain;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED1"
     *             length="50"
     *         
     */
    public String getReserved1() {
        return this.reserved1;
    }

    public void setReserved1(String reserved1) {
        this.reserved1 = reserved1;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED2"
     *             length="50"
     *         
     */
    public String getReserved2() {
        return this.reserved2;
    }

    public void setReserved2(String reserved2) {
        this.reserved2 = reserved2;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED3"
     *             length="50"
     *         
     */
    public String getReserved3() {
        return this.reserved3;
    }

    public void setReserved3(String reserved3) {
        this.reserved3 = reserved3;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("cgnGuid", getCgnGuid())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof CcpGtNode) ) return false;
        CcpGtNode castOther = (CcpGtNode) other;
        return new EqualsBuilder()
            .append(this.getCgnGuid(), castOther.getCgnGuid())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getCgnGuid())
            .toHashCode();
    }

}
